// 引入mongodb操作模块
const mongoose = require('mongoose')
// 连接mongodb
mongoose.connect('mongodb://localhost:27017/gp23', {
  useNewUrlParser: true,
  useUnifiedTopology: true
});
// 定义
const schema = new mongoose.Schema({
  name: String,
  age: Number,
  isdel: Number
});
// 模型
module.exports = mongoose.model('C', schema, 'c1')